{include file="public/header" /}


<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_statstore}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

  <div class="fixed-empty"></div>
<!--   <div style="width:100%; text-align:right;padding-top:10px;">
  	<input type="hidden" id="export_type" data-url="{:url(request()->controller().'/'.request()->action())}/exporttype/excel" name="export_type" data-param='{"url":"{$actionurl}&exporttype=excel"}' value="excel"/>
  	<a class="btn btn-mini" href="javascript:void(0);" id="export_btn">{$Think.lang.ds_export}Excel</a>
  </div> -->
  <form method="post" id="form_member">
    <table class="ds-default-table nobdb">
      <thead>
        <tr class="thead">
          <!-- <th class="align-center">{$Think.lang.ds_member_name}</th> -->
          <th class="align-center">{$Think.lang.ds_seller_name}</th>
          <th class="align-center">供货商名称</th>
          <th class="align-center">供货商类型</th>
          <th class="align-center">法人姓名</th>
          <th class="align-center">状态</th>
          <th class="align-center w136">账期</th>
          <th class="align-center w36">账期额度</th>
          <th class="align-center w36">账期天数</th>
          <th class="align-center w36">余额</th>
          
          <th class="align-center">{$Think.lang.statstore_addtime}</th>
        </tr>
      <tbody id="datatable">
        {notempty name="store_list"}
        {foreach name="store_list" item="v" key="k" }
        <tr class="hover member">
          <!-- <td class="align-center">{$v.member_name}</td> -->
          <td class="align-center">{$v.seller_name}</td>
          <td class="align-center">{$v.store_name}</td>
          <td class="align-center">{$v.storeclass_name}</td>
          <td class="align-center">{$v.legal_person}</td>
          <td class="align-center w72">{$v['store_state']?'开启':'关闭'}</td>
          <td class="align-center">{$v.credit_num == 0 ? '未设置' : '已设置'}</td>
          <td class="align-center">{$v.credit_num}</td>
          <td class="align-center">{$v.credit_day}</td>
          <td class="align-center">{$v.balance}</td>
          <td class="align-center">{$v.store_addtime|date="Y-m-d",###}</td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
          <td colspan="11">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
      </tbody>
    </table>
      {$show_page}
  </form>

</div>
<script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
<script>
$(function(){
    //导出图表
    $("#export_btn").click(function(){
        var item = $("#export_type");
        var type = $(item).val();
        if(type == 'excel'){
            export_xls(item.attr('data-url').replace('.html',''));
        }
    });
});
</script>